3.204 \(\int \frac{\cot ^2(c+d x)}{(a+a \sec (c+d x))^{5/2}} \, dx\)

Optimal. Leaf size=265 \[ \frac{63 \cot (c+d x) \sqrt{a \sec (c+d x)+a}}{128 a^3 d}-\frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a \sec (c+d x)+a}}\right )}{a^{5/2} d}+\frac{319 \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a \sec (c+d x)+a}}\right )}{128 \sqrt{2} a^{5/2} d}-\frac{\cos ^3(c+d x) \cot (c+d x) \sec ^6\left (\frac{1}{2} (c+d x)\right ) \sqrt{a \sec (c+d x)+a}}{48 a^3 d}-\frac{19 \cos ^2(c+d x) \cot (c+d x) \sec ^4\left (\frac{1}{2} (c+d x)\right ) \sqrt{a \sec (c+d x)+a}}{192 a^3 d}-\frac{191 \cos (c+d x) \cot (c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) \sqrt{a \sec (c+d x)+a}}{384 a^3 d} \]

[Out]

(-2*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/(a^(5/2)*d) + (319*ArcTan[(Sqrt[a]*Tan[c + d*x])/
(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/(128*Sqrt[2]*a^(5/2)*d) + (63*Cot[c + d*x]*Sqrt[a + a*Sec[c + d*x]])/(128
*a^3*d) - (191*Cos[c + d*x]*Cot[c + d*x]*Sec[(c + d*x)/2]^2*Sqrt[a + a*Sec[c + d*x]])/(384*a^3*d) - (19*Cos[c
+ d*x]^2*Cot[c + d*x]*Sec[(c + d*x)/2]^4*Sqrt[a + a*Sec[c + d*x]])/(192*a^3*d) - (Cos[c + d*x]^3*Cot[c + d*x]*
Sec[(c + d*x)/2]^6*Sqrt[a + a*Sec[c + d*x]])/(48*a^3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.23319, antiderivative size = 265, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {3887, 472, 579, 583, 522, 203} \[ \frac{63 \cot (c+d x) \sqrt{a \sec (c+d x)+a}}{128 a^3 d}-\frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a \sec (c+d x)+a}}\right )}{a^{5/2} d}+\frac{319 \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a \sec (c+d x)+a}}\right )}{128 \sqrt{2} a^{5/2} d}-\frac{\cos ^3(c+d x) \cot (c+d x) \sec ^6\left (\frac{1}{2} (c+d x)\right ) \sqrt{a \sec (c+d x)+a}}{48 a^3 d}-\frac{19 \cos ^2(c+d x) \cot (c+d x) \sec ^4\left (\frac{1}{2} (c+d x)\right ) \sqrt{a \sec (c+d x)+a}}{192 a^3 d}-\frac{191 \cos (c+d x) \cot (c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) \sqrt{a \sec (c+d x)+a}}{384 a^3 d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^2/(a + a*Sec[c + d*x])^(5/2),x]

[Out]

(-2*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/(a^(5/2)*d) + (319*ArcTan[(Sqrt[a]*Tan[c + d*x])/
(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/(128*Sqrt[2]*a^(5/2)*d) + (63*Cot[c + d*x]*Sqrt[a + a*Sec[c + d*x]])/(128
*a^3*d) - (191*Cos[c + d*x]*Cot[c + d*x]*Sec[(c + d*x)/2]^2*Sqrt[a + a*Sec[c + d*x]])/(384*a^3*d) - (19*Cos[c
+ d*x]^2*Cot[c + d*x]*Sec[(c + d*x)/2]^4*Sqrt[a + a*Sec[c + d*x]])/(192*a^3*d) - (Cos[c + d*x]^3*Cot[c + d*x]*
Sec[(c + d*x)/2]^6*Sqrt[a + a*Sec[c + d*x]])/(48*a^3*d)

Rule 3887

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[(-2*a^(m/2 +
 n + 1/2))/d, Subst[Int[(x^m*(2 + a*x^2)^(m/2 + n - 1/2))/(1 + a*x^2), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c +
d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && IntegerQ[n - 1/2]

Rule 472

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(b*(e*x
)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*e*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d)*(
p + 1)), Int[(e*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*b*(m + 1) + n*(b*c - a*d)*(p + 1) + d*b*(m + n*(
p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p
, -1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 579

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_)*((e_) + (f_.)*(x_)^(n_)), x
_Symbol] :> -Simp[((b*e - a*f)*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*g*n*(b*c - a*d)*(p +
1)), x] + Dist[1/(a*n*(b*c - a*d)*(p + 1)), Int[(g*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f)*(
m + 1) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d,
 e, f, g, m, q}, x] && IGtQ[n, 0] && LtQ[p, -1]

Rule 583

Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[(e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*c*g*(m + 1)), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
 IGtQ[n, 0] && LtQ[m, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\cot ^2(c+d x)}{(a+a \sec (c+d x))^{5/2}} \, dx &=-\frac{2 \operatorname{Subst}\left (\int \frac{1}{x^2 \left (1+a x^2\right ) \left (2+a x^2\right )^4} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{a^3 d}\\ &=-\frac{\cos ^3(c+d x) \cot (c+d x) \sec ^6\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{48 a^3 d}-\frac{\operatorname{Subst}\left (\int \frac{5 a-7 a^2 x^2}{x^2 \left (1+a x^2\right ) \left (2+a x^2\right )^3} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{6 a^4 d}\\ &=-\frac{19 \cos ^2(c+d x) \cot (c+d x) \sec ^4\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{192 a^3 d}-\frac{\cos ^3(c+d x) \cot (c+d x) \sec ^6\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{48 a^3 d}-\frac{\operatorname{Subst}\left (\int \frac{a^2-95 a^3 x^2}{x^2 \left (1+a x^2\right ) \left (2+a x^2\right )^2} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{48 a^5 d}\\ &=-\frac{191 \cos (c+d x) \cot (c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{384 a^3 d}-\frac{19 \cos ^2(c+d x) \cot (c+d x) \sec ^4\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{192 a^3 d}-\frac{\cos ^3(c+d x) \cot (c+d x) \sec ^6\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{48 a^3 d}-\frac{\operatorname{Subst}\left (\int \frac{-189 a^3-573 a^4 x^2}{x^2 \left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{192 a^6 d}\\ &=\frac{63 \cot (c+d x) \sqrt{a+a \sec (c+d x)}}{128 a^3 d}-\frac{191 \cos (c+d x) \cot (c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{384 a^3 d}-\frac{19 \cos ^2(c+d x) \cot (c+d x) \sec ^4\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{192 a^3 d}-\frac{\cos ^3(c+d x) \cot (c+d x) \sec ^6\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{48 a^3 d}+\frac{\operatorname{Subst}\left (\int \frac{579 a^4-189 a^5 x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{384 a^6 d}\\ &=\frac{63 \cot (c+d x) \sqrt{a+a \sec (c+d x)}}{128 a^3 d}-\frac{191 \cos (c+d x) \cot (c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{384 a^3 d}-\frac{19 \cos ^2(c+d x) \cot (c+d x) \sec ^4\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{192 a^3 d}-\frac{\cos ^3(c+d x) \cot (c+d x) \sec ^6\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{48 a^3 d}+\frac{2 \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{a^2 d}-\frac{319 \operatorname{Subst}\left (\int \frac{1}{2+a x^2} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{128 a^2 d}\\ &=-\frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{a^{5/2} d}+\frac{319 \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a+a \sec (c+d x)}}\right )}{128 \sqrt{2} a^{5/2} d}+\frac{63 \cot (c+d x) \sqrt{a+a \sec (c+d x)}}{128 a^3 d}-\frac{191 \cos (c+d x) \cot (c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{384 a^3 d}-\frac{19 \cos ^2(c+d x) \cot (c+d x) \sec ^4\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{192 a^3 d}-\frac{\cos ^3(c+d x) \cot (c+d x) \sec ^6\left (\frac{1}{2} (c+d x)\right ) \sqrt{a+a \sec (c+d x)}}{48 a^3 d}\\ \end{align*}

Mathematica [C]  time = 23.627, size = 5614, normalized size = 21.18 \[ \text{Result too large to show} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Cot[c + d*x]^2/(a + a*Sec[c + d*x])^(5/2),x]

[Out]

Result too large to show

________________________________________________________________________________________

Maple [B]  time = 0.259, size = 714, normalized size = 2.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^2/(a+a*sec(d*x+c))^(5/2),x)

[Out]

-1/768/d/a^3*(a*(cos(d*x+c)+1)/cos(d*x+c))^(1/2)*(-1+cos(d*x+c))^3*(768*2^(1/2)*cos(d*x+c)^3*sin(d*x+c)*(-2*co
s(d*x+c)/(cos(d*x+c)+1))^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)/cos(d*x+c))
+2304*2^(1/2)*cos(d*x+c)^2*sin(d*x+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(d*x+c)/
(cos(d*x+c)+1))^(1/2)*sin(d*x+c)/cos(d*x+c))+957*cos(d*x+c)^3*sin(d*x+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*
ln(-(-(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)+cos(d*x+c)-1)/sin(d*x+c))+2304*2^(1/2)*cos(d*x+c)*sin(d*
x+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)/
cos(d*x+c))+2871*cos(d*x+c)^2*sin(d*x+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*ln(-(-(-2*cos(d*x+c)/(cos(d*x+c)
+1))^(1/2)*sin(d*x+c)+cos(d*x+c)-1)/sin(d*x+c))+768*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*2^(1/2)*arctanh(1/2*2
^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)/cos(d*x+c))*sin(d*x+c)-818*cos(d*x+c)^4+2871*cos(d*x+c)
*sin(d*x+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*ln(-(-(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)+cos(d*x
+c)-1)/sin(d*x+c))-698*cos(d*x+c)^3+957*sin(d*x+c)*ln(-(-(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)+cos(d
*x+c)-1)/sin(d*x+c))*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)+370*cos(d*x+c)^2+378*cos(d*x+c))/sin(d*x+c)^7

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot \left (d x + c\right )^{2}}{{\left (a \sec \left (d x + c\right ) + a\right )}^{\frac{5}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2/(a+a*sec(d*x+c))^(5/2),x, algorithm="maxima")

[Out]

integrate(cot(d*x + c)^2/(a*sec(d*x + c) + a)^(5/2), x)

________________________________________________________________________________________

Fricas [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2/(a+a*sec(d*x+c))^(5/2),x, algorithm="fricas")

[Out]

Exception raised: UnboundLocalError

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**2/(a+a*sec(d*x+c))**(5/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 9.28286, size = 277, normalized size = 1.05 \begin{align*} -\frac{\sqrt{-a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a}{\left (2 \,{\left (\frac{4 \, \sqrt{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}}{a^{3} \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )} - \frac{31 \, \sqrt{2}}{a^{3} \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}\right )} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + \frac{291 \, \sqrt{2}}{a^{3} \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}\right )} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \frac{96 \, \sqrt{2}}{{\left ({\left (\sqrt{-a} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \sqrt{-a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a}\right )}^{2} - a\right )} \sqrt{-a} a \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}}{768 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2/(a+a*sec(d*x+c))^(5/2),x, algorithm="giac")

[Out]

-1/768*(sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a)*(2*(4*sqrt(2)*tan(1/2*d*x + 1/2*c)^2/(a^3*sgn(tan(1/2*d*x + 1/2*c)
^2 - 1)) - 31*sqrt(2)/(a^3*sgn(tan(1/2*d*x + 1/2*c)^2 - 1)))*tan(1/2*d*x + 1/2*c)^2 + 291*sqrt(2)/(a^3*sgn(tan
(1/2*d*x + 1/2*c)^2 - 1)))*tan(1/2*d*x + 1/2*c) - 96*sqrt(2)/(((sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/
2*d*x + 1/2*c)^2 + a))^2 - a)*sqrt(-a)*a*sgn(tan(1/2*d*x + 1/2*c)^2 - 1)))/d